import {useRoutes} from "react-router-dom"
//登录
import Login from "../pages/login"
//首页
import App from "../pages/App"
import Home from "../pages/home"
//访客记录
import Guestlist from "../pages/Visitorlog/Guestlist"
import Guestfunction from "../pages/Visitorlog/Guestfunction"
import Responsibleperson from "../pages/Visitorlog/Responsibleperson"
const Routes = () =>{
    return useRoutes([
        {
            path: '/',
            element: <Login />
        },
       
        {
            path:'/index',
            element:<Login/>,
        },
        //访客记录
        {
            path:'/home',
            element:<Home/>,
            children:[
                {
                    index:true,
                    element:<App></App>
                },
                {
                    path:'Guestlist',
                    element:<Guestlist/>
                },
                {
                    path:'Guestfunction',
                    element:<Guestfunction/>
                },
                {
                    path:'Responsibleperson',
                    element:<Responsibleperson/>
                }
            ]
        }
    ])
}

export default Routes